package com.entity;

import java.util.ArrayList;
import java.util.List;

public class GoodExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public GoodExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andGidIsNull() {
            addCriterion("Gid is null");
            return (Criteria) this;
        }

        public Criteria andGidIsNotNull() {
            addCriterion("Gid is not null");
            return (Criteria) this;
        }

        public Criteria andGidEqualTo(Integer value) {
            addCriterion("Gid =", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidNotEqualTo(Integer value) {
            addCriterion("Gid <>", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidGreaterThan(Integer value) {
            addCriterion("Gid >", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidGreaterThanOrEqualTo(Integer value) {
            addCriterion("Gid >=", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidLessThan(Integer value) {
            addCriterion("Gid <", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidLessThanOrEqualTo(Integer value) {
            addCriterion("Gid <=", value, "gid");
            return (Criteria) this;
        }

        public Criteria andGidIn(List<Integer> values) {
            addCriterion("Gid in", values, "gid");
            return (Criteria) this;
        }

        public Criteria andGidNotIn(List<Integer> values) {
            addCriterion("Gid not in", values, "gid");
            return (Criteria) this;
        }

        public Criteria andGidBetween(Integer value1, Integer value2) {
            addCriterion("Gid between", value1, value2, "gid");
            return (Criteria) this;
        }

        public Criteria andGidNotBetween(Integer value1, Integer value2) {
            addCriterion("Gid not between", value1, value2, "gid");
            return (Criteria) this;
        }

        public Criteria andGnameIsNull() {
            addCriterion("Gname is null");
            return (Criteria) this;
        }

        public Criteria andGnameIsNotNull() {
            addCriterion("Gname is not null");
            return (Criteria) this;
        }

        public Criteria andGnameEqualTo(String value) {
            addCriterion("Gname =", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameNotEqualTo(String value) {
            addCriterion("Gname <>", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameGreaterThan(String value) {
            addCriterion("Gname >", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameGreaterThanOrEqualTo(String value) {
            addCriterion("Gname >=", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameLessThan(String value) {
            addCriterion("Gname <", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameLessThanOrEqualTo(String value) {
            addCriterion("Gname <=", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameLike(String value) {
            addCriterion("Gname like", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameNotLike(String value) {
            addCriterion("Gname not like", value, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameIn(List<String> values) {
            addCriterion("Gname in", values, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameNotIn(List<String> values) {
            addCriterion("Gname not in", values, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameBetween(String value1, String value2) {
            addCriterion("Gname between", value1, value2, "gname");
            return (Criteria) this;
        }

        public Criteria andGnameNotBetween(String value1, String value2) {
            addCriterion("Gname not between", value1, value2, "gname");
            return (Criteria) this;
        }

        public Criteria andGtypenameIsNull() {
            addCriterion("GTypeName is null");
            return (Criteria) this;
        }

        public Criteria andGtypenameIsNotNull() {
            addCriterion("GTypeName is not null");
            return (Criteria) this;
        }

        public Criteria andGtypenameEqualTo(Integer value) {
            addCriterion("GTypeName =", value, "gtypename");
            return (Criteria) this;
        }

        public Criteria andGtypenameNotEqualTo(Integer value) {
            addCriterion("GTypeName <>", value, "gtypename");
            return (Criteria) this;
        }

        public Criteria andGtypenameGreaterThan(Integer value) {
            addCriterion("GTypeName >", value, "gtypename");
            return (Criteria) this;
        }

        public Criteria andGtypenameGreaterThanOrEqualTo(Integer value) {
            addCriterion("GTypeName >=", value, "gtypename");
            return (Criteria) this;
        }

        public Criteria andGtypenameLessThan(Integer value) {
            addCriterion("GTypeName <", value, "gtypename");
            return (Criteria) this;
        }

        public Criteria andGtypenameLessThanOrEqualTo(Integer value) {
            addCriterion("GTypeName <=", value, "gtypename");
            return (Criteria) this;
        }

        public Criteria andGtypenameIn(List<Integer> values) {
            addCriterion("GTypeName in", values, "gtypename");
            return (Criteria) this;
        }

        public Criteria andGtypenameNotIn(List<Integer> values) {
            addCriterion("GTypeName not in", values, "gtypename");
            return (Criteria) this;
        }

        public Criteria andGtypenameBetween(Integer value1, Integer value2) {
            addCriterion("GTypeName between", value1, value2, "gtypename");
            return (Criteria) this;
        }

        public Criteria andGtypenameNotBetween(Integer value1, Integer value2) {
            addCriterion("GTypeName not between", value1, value2, "gtypename");
            return (Criteria) this;
        }

        public Criteria andSidIsNull() {
            addCriterion("Sid is null");
            return (Criteria) this;
        }

        public Criteria andSidIsNotNull() {
            addCriterion("Sid is not null");
            return (Criteria) this;
        }

        public Criteria andSidEqualTo(Integer value) {
            addCriterion("Sid =", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotEqualTo(Integer value) {
            addCriterion("Sid <>", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidGreaterThan(Integer value) {
            addCriterion("Sid >", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidGreaterThanOrEqualTo(Integer value) {
            addCriterion("Sid >=", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidLessThan(Integer value) {
            addCriterion("Sid <", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidLessThanOrEqualTo(Integer value) {
            addCriterion("Sid <=", value, "sid");
            return (Criteria) this;
        }

        public Criteria andSidIn(List<Integer> values) {
            addCriterion("Sid in", values, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotIn(List<Integer> values) {
            addCriterion("Sid not in", values, "sid");
            return (Criteria) this;
        }

        public Criteria andSidBetween(Integer value1, Integer value2) {
            addCriterion("Sid between", value1, value2, "sid");
            return (Criteria) this;
        }

        public Criteria andSidNotBetween(Integer value1, Integer value2) {
            addCriterion("Sid not between", value1, value2, "sid");
            return (Criteria) this;
        }

        public Criteria andGimagIsNull() {
            addCriterion("Gimag is null");
            return (Criteria) this;
        }

        public Criteria andGimagIsNotNull() {
            addCriterion("Gimag is not null");
            return (Criteria) this;
        }

        public Criteria andGimagEqualTo(String value) {
            addCriterion("Gimag =", value, "gimag");
            return (Criteria) this;
        }

        public Criteria andGimagNotEqualTo(String value) {
            addCriterion("Gimag <>", value, "gimag");
            return (Criteria) this;
        }

        public Criteria andGimagGreaterThan(String value) {
            addCriterion("Gimag >", value, "gimag");
            return (Criteria) this;
        }

        public Criteria andGimagGreaterThanOrEqualTo(String value) {
            addCriterion("Gimag >=", value, "gimag");
            return (Criteria) this;
        }

        public Criteria andGimagLessThan(String value) {
            addCriterion("Gimag <", value, "gimag");
            return (Criteria) this;
        }

        public Criteria andGimagLessThanOrEqualTo(String value) {
            addCriterion("Gimag <=", value, "gimag");
            return (Criteria) this;
        }

        public Criteria andGimagLike(String value) {
            addCriterion("Gimag like", value, "gimag");
            return (Criteria) this;
        }

        public Criteria andGimagNotLike(String value) {
            addCriterion("Gimag not like", value, "gimag");
            return (Criteria) this;
        }

        public Criteria andGimagIn(List<String> values) {
            addCriterion("Gimag in", values, "gimag");
            return (Criteria) this;
        }

        public Criteria andGimagNotIn(List<String> values) {
            addCriterion("Gimag not in", values, "gimag");
            return (Criteria) this;
        }

        public Criteria andGimagBetween(String value1, String value2) {
            addCriterion("Gimag between", value1, value2, "gimag");
            return (Criteria) this;
        }

        public Criteria andGimagNotBetween(String value1, String value2) {
            addCriterion("Gimag not between", value1, value2, "gimag");
            return (Criteria) this;
        }

        public Criteria andGpriceIsNull() {
            addCriterion("GPrice is null");
            return (Criteria) this;
        }

        public Criteria andGpriceIsNotNull() {
            addCriterion("GPrice is not null");
            return (Criteria) this;
        }

        public Criteria andGpriceEqualTo(Integer value) {
            addCriterion("GPrice =", value, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceNotEqualTo(Integer value) {
            addCriterion("GPrice <>", value, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceGreaterThan(Integer value) {
            addCriterion("GPrice >", value, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceGreaterThanOrEqualTo(Integer value) {
            addCriterion("GPrice >=", value, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceLessThan(Integer value) {
            addCriterion("GPrice <", value, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceLessThanOrEqualTo(Integer value) {
            addCriterion("GPrice <=", value, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceIn(List<Integer> values) {
            addCriterion("GPrice in", values, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceNotIn(List<Integer> values) {
            addCriterion("GPrice not in", values, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceBetween(Integer value1, Integer value2) {
            addCriterion("GPrice between", value1, value2, "gprice");
            return (Criteria) this;
        }

        public Criteria andGpriceNotBetween(Integer value1, Integer value2) {
            addCriterion("GPrice not between", value1, value2, "gprice");
            return (Criteria) this;
        }

        public Criteria andGdescribeIsNull() {
            addCriterion("GDescribe is null");
            return (Criteria) this;
        }

        public Criteria andGdescribeIsNotNull() {
            addCriterion("GDescribe is not null");
            return (Criteria) this;
        }

        public Criteria andGdescribeEqualTo(String value) {
            addCriterion("GDescribe =", value, "gdescribe");
            return (Criteria) this;
        }

        public Criteria andGdescribeNotEqualTo(String value) {
            addCriterion("GDescribe <>", value, "gdescribe");
            return (Criteria) this;
        }

        public Criteria andGdescribeGreaterThan(String value) {
            addCriterion("GDescribe >", value, "gdescribe");
            return (Criteria) this;
        }

        public Criteria andGdescribeGreaterThanOrEqualTo(String value) {
            addCriterion("GDescribe >=", value, "gdescribe");
            return (Criteria) this;
        }

        public Criteria andGdescribeLessThan(String value) {
            addCriterion("GDescribe <", value, "gdescribe");
            return (Criteria) this;
        }

        public Criteria andGdescribeLessThanOrEqualTo(String value) {
            addCriterion("GDescribe <=", value, "gdescribe");
            return (Criteria) this;
        }

        public Criteria andGdescribeLike(String value) {
            addCriterion("GDescribe like", value, "gdescribe");
            return (Criteria) this;
        }

        public Criteria andGdescribeNotLike(String value) {
            addCriterion("GDescribe not like", value, "gdescribe");
            return (Criteria) this;
        }

        public Criteria andGdescribeIn(List<String> values) {
            addCriterion("GDescribe in", values, "gdescribe");
            return (Criteria) this;
        }

        public Criteria andGdescribeNotIn(List<String> values) {
            addCriterion("GDescribe not in", values, "gdescribe");
            return (Criteria) this;
        }

        public Criteria andGdescribeBetween(String value1, String value2) {
            addCriterion("GDescribe between", value1, value2, "gdescribe");
            return (Criteria) this;
        }

        public Criteria andGdescribeNotBetween(String value1, String value2) {
            addCriterion("GDescribe not between", value1, value2, "gdescribe");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}